<?php

	class Video_provider_model extends CI_Model {

		protected $__tbname = 'video_provider';
		protected $__dbconf = 'default';

		var $id;	//int(10) unsigned	Primary Key	Auto Increment	NOT NULL
		var $name;	//varchar(255)			NOT NULL
		var $logo;	//varchar(255)			NULL
		var $width = 0;	//int(10)			NULL
		var $height = 0;	//int(10)			NULL
		var $pos_x = 0;	//int(10)			NULL
		var $pos_y = 0;	//int(10)			NULL
		var $ref_type = 0;	//tinyint(1)			NULL
		var $ref_text;	//varchar(255)			NULL
		var $provider_status = 0;	//tinyint(1)			NULL
		var $is_deleted = 0;	//tinyint(1)			NULL
		var $status = 0;	//tinyint(1)			NULL
		var $default_behavior = 0;	//tinyint(1)			NULL
		var $default_position = 0;	//tinyint(1)			NULL
		var $ref_prefix;	//varchar(50)			NULL
		var $embed_code;	//text			NULL
		var $url;	//varchar(255)			NULL

		protected $__validation_rule = array(
			'id' => array('key' => 'PRI', 'type' => 'int', 'null' => FALSE, 'auto_increment' => TRUE),
			'name' => array('type' => 'varchar', 'size' => 255, 'null' => FALSE),
			'logo' => array('type' => 'varchar', 'size' => 255, 'null' => TRUE),
			'width' => array('type' => 'int', 'null' => TRUE),
			'height' => array('type' => 'int', 'null' => TRUE),
			'pos_x' => array('type' => 'int', 'null' => TRUE),
			'pos_y' => array('type' => 'int', 'null' => TRUE),
			'ref_type' => array('type' => 'tinyint', 'null' => TRUE),
			'ref_text' => array('type' => 'varchar', 'size' => 255, 'null' => TRUE),
			'provider_status' => array('type' => 'tinyint', 'null' => TRUE),
			'is_deleted' => array('type' => 'tinyint', 'null' => TRUE),
			'status' => array('type' => 'tinyint', 'null' => TRUE),
			'default_behavior' => array('type' => 'tinyint', 'null' => TRUE),
			'default_position' => array('type' => 'tinyint', 'null' => TRUE),
			'ref_prefix' => array('type' => 'varchar', 'size' => 50, 'null' => TRUE),
			'embed_code' => array('type' => 'text', 'null' => TRUE),
			'url' => array('type' => 'varchar', 'size' => 255, 'null' => TRUE)
		);
	}
